<template>
  <div class="box">
  <span @click="toAdd">新增</span>
  </div>
</template>

<script setup>
import {ref} from 'vue'
//从vuex中导入useStore方法
import {useTasklistStore} from '../../stores/tasklist'

import { useRouter } from 'vue-router';
var $router=useRouter()
var inputText = ref('')

//调用useStore方法 获取store对象
var store = useTasklistStore()

//新增任务
var toAdd = ()=>{
  $router.push('/add')

}
</script>

<style scoped>

.box span{
  width: 80px;
  display: inline-block;
  text-align: center;
  line-height: 40px;
  color: rgb(33, 146, 216);
  border: 1px solid  rgb(33, 146, 216);
  margin: 10px;
}
</style>